package com.sqoop.core.destnation;

import com.sqoop.core.msg.MsgDestination;

/**
 * Created by zw on 2017/11/6.
 */
public class MqMsgDestination implements MsgDestination{
    private String mqurl;
    private String queuename;
    private String queuetype;
    private String username;
    private String password;

    public String getMqurl() {
        return mqurl;
    }

    public void setMqurl(String mqurl) {
        this.mqurl = mqurl;
    }

    public String getQueuename() {
        return queuename;
    }

    public void setQueuename(String queuename) {
        this.queuename = queuename;
    }

    public String getQueuetype() {
        return queuetype;
    }

    public void setQueuetype(String queuetype) {
        this.queuetype = queuetype;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MqMsgDestination that = (MqMsgDestination) o;

        if (mqurl != null ? !mqurl.equals(that.mqurl) : that.mqurl != null) return false;
        if (queuename != null ? !queuename.equals(that.queuename) : that.queuename != null) return false;
        if (queuetype != null ? !queuetype.equals(that.queuetype) : that.queuetype != null) return false;
        if (username != null ? !username.equals(that.username) : that.username != null) return false;
        return password != null ? password.equals(that.password) : that.password == null;
    }

    @Override
    public int hashCode() {
        int result = mqurl != null ? mqurl.hashCode() : 0;
        result = 31 * result + (queuename != null ? queuename.hashCode() : 0);
        result = 31 * result + (queuetype != null ? queuetype.hashCode() : 0);
        result = 31 * result + (username != null ? username.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        return result;
    }
}